Fix #30971: Handle requisites correctly for empty SLS files#68534
Open
dwoz wants to merge 1 commit intosaltstack:3006.xfrom
Open
Fix #30971: Handle requisites correctly for empty SLS files#68534dwoz wants to merge 1 commit intosaltstack:3006.xfrom
dwoz wants to merge 1 commit intosaltstack:3006.xfrom
Conversation
bdrx312
reviewed
Dec 15, 2025
| from salt.serializers.msgpack import serialize as msgpack_serialize | ||
| from salt.template import compile_template, compile_template_str | ||
| from salt.utils.datastructures import DefaultOrderedDict, HashableOrderedDict | ||
| from salt.utils.odict import DefaultOrderedDict, HashableOrderedDict |
Contributor
There was a problem hiding this comment.
This doesn't look right. Weren't all the usages intentionally moved out of odict to datastructures and odict deprecated?
Contributor
|
Changelog |
bdrx312
reviewed
Dec 17, 2025
Comment on lines
-1234
to
-1235
| if isinstance(low_data["check_cmd"], str): | ||
| low_data["check_cmd"] = [low_data["check_cmd"]] |
Contributor
There was a problem hiding this comment.
This looks like it was inadvertently removed
| # Track all SLS files that were processed, even if they produced no chunks | ||
| # This is needed to handle SLS files that produce no output but are still | ||
| # required by other states (Issue #30971) | ||
| processed_sls_files = set() |
Contributor
There was a problem hiding this comment.
This processed_sls_files variable appears to be unused. It is added to below but I don't see where it is ever read.
Empty SLS files were not being tracked properly for requisite checking, causing 'requisite not found' errors. This fix ensures empty SLS files are processed and tracked correctly for requisite dependencies. - Added _processed_sls_files set to track processed SLS files - Track SLS files in compile_high_data even if they produce no chunks - Check _processed_sls_files when validating SLS requisites - Handle empty SLS requisites in call_chunk execution - Track SLS files in render_state and get_highstate - Added test case to test_require.py to verify the fix
00f5685 to
28e8967
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Empty SLS files were not being tracked properly for requisite checking, causing 'requisite not found' errors. This fix ensures empty SLS files are processed and tracked correctly for requisite dependencies.
Fixes #30971